package pers.jphoebe.quartz.entity.response;

/**
 * Created by 蒋时华 on 2017-8-1.
 */
public enum ErrorCode {

    ERROR_SYSTEM(0000,"系统错误"),
    CUSTOM_ERROR(4441,"自定义异常信息"),
    ERROR_TIMEOUT_OPT(4442,"超时操作或该操作已经执行"),

    SUCCESS_CODE(0,"请求成功"),
    ERROR_TOOMANYREQUEST(1,"请求频率过快"),
    ERROR_ACCESSTOKEN(2,"获取AccessToken失败"),
    ERROR_FRESH_ACCESSTOKEN(3,"刷新AccessToken失败"),
    ERROR_ACCESSTOKEN_IN_REDIS(4,"Redis中不存在该刷新AccessToken"),
    ERROR_API_FAILE(5,"API请求调用失败"),
    ERROR_FRESH_ACCESS_DENIED(6,"AccessToken授权失败"),
    ERROR_METHOD_NOT_ALLOWED(7,"不支持该请求方法"),
    ERROR_MISS_PARAMTER(8,"缺少参数"),
    ERROR_PARAMTER_MATCH(9,"参数转换错误"),
    ERROR_TIMEOUT(10,"请求超时"),
    ERROR_NOT_SUPPORT_MEDIA_TYPE(11,"不支持该媒体类型"),
    ERROR_NOT_ACCEPTED_MEDIA_TYPE(12,"不可接受该媒体类型"),
    ERROR_REQUEST_BODY(13,"requestBody参数验证错误"),
    ERROR_UPLOAD_FILE(14,"文件上传错误"),


    ERROR_CODE(300,"请求失败"),
    ERROR_INIT(301,"初始化数据失败"),
    ERROR_ERRORUSER(401,"获取用户信息失败"),
    ERROR_NOUSER(402,"用户不存在"),
    ERROR_NOSOMEUSER(403,"部分用户不存在"),
    ERROR_INVAL_REGISTER_USER(404,"注册用户失败"),
    ERROR_EXISTS_REGISTER_USER(405,"用户已经存在"),
    ERROR_UPDATE_USER_STATUS(406,"更新用户状态失败"),
    ERROR_UPDATE_USER_SIGN(407,"更新用户签名失败"),
    ERROR_QUERY_USER(408,"查找用户失败"),
    ERROR_ERRORFRIEND(501,"获取好友列表信息失败"),
    ERROR_ADD_FRIEND(502,"保存好友申请失败"),
    ERROR_ADD_FRIEND_REQUEST(503,"获取好友申请请求失败"),
    ERROR_HANDLE_AGREE_FRIEND_REQUEST(504,"处理添加好友请求失败"),
    ERROR_HANDLE_REFUSE_FRIEND_REQUEST(505,"处理拒绝好友请求失败"),
    ERROR_MSG_BOX(506,"获取消息盒子数据失败"),
    ERROR_MESSAGE(601,"发送信息失败"),

    ERROR_SAVE_VARIETY(701,"添加投资种类失败"),
    ERROR_RECEIVE_AUTD(702,"获取Au(T+D)信息失败"),
    ERROR_RECEIVE_AGTD(703,"获取AG(T+D)信息失败"),
    ERROR_UNSUPPORT_VARIETY(704,"不支持此投资种类");


    private Integer code;
    private String message;

    private ErrorCode(Integer code, String message){
        this.code = code;
        this.message = message;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

}
